﻿<phone:PhoneApplicationPage 
    x:Class="SlXnaApp3.ScorePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot Title="Score Board">
            <!--Pivot item one-->
            <controls:PivotItem Header="Easy Mode">
                <!--<ListBox x:Name="listBox1" Loaded="listBox1_Loaded_1" ItemsSource="{Binding Score}"-->
                <ListBox x:Name="listBox1" SelectionMode="Extended" Loaded="listBox1_Loaded" ItemsSource="{Binding Score}" FontSize="30" >
                    
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Border BorderThickness="10" >
                                
                                <StackPanel Orientation="Vertical" >
                                    <toolkit:ContextMenuService.ContextMenu>
                                        <toolkit:ContextMenu Name="ContextMenu" >
                                            <toolkit:MenuItem Name="Delete"  Header="Share" Click="Delete_Click"/>
                                        </toolkit:ContextMenu>
                                    </toolkit:ContextMenuService.ContextMenu>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Name: " />
                                        <TextBlock Text="{Binding Name}" />
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Score: " />
                                        <TextBlock Text="{Binding score}" />
                                    </StackPanel>

                                    <TextBlock Text="Other Information" FontSize="20"/>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Country: " FontSize="18"/>
                                        <TextBlock Text="{Binding Country}" FontSize="18" />
                                        <TextBlock Text="  Difficulty Mode: " FontSize="18"/>
                                        <TextBlock Text="{Binding Difficulty}" FontSize="18" />
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Level: "  FontSize="18"/>
                                        <TextBlock Text="{Binding LevelNo}" FontSize="18" />
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>

            <!--Pivot item two-->
            <controls:PivotItem Header="Difficult Mode">
                <ListBox x:Name="listBox2" Loaded="listBox2_Loaded" SelectionMode="Multiple" ItemsSource="{Binding Score}" FontSize="30" >
                  
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Border  BorderThickness="10">
                                <StackPanel Orientation="Vertical" >
                                    <toolkit:ContextMenuService.ContextMenu>
                                        <toolkit:ContextMenu Name="ContextMenu2" >
                                            <toolkit:MenuItem Name="Delete2"  Header="Share" Click="Delete_Click"/>
                                        </toolkit:ContextMenu>
                                    </toolkit:ContextMenuService.ContextMenu>
                                    <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="Name: " />
                                    <TextBlock Text="{Binding Name}" />
                                </StackPanel>                              
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="Score: " />
                                    <TextBlock Text="{Binding score}" />
                                </StackPanel>

                                <TextBlock Text="Other Information" FontSize="20"/>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="Country: " FontSize="18"/>
                                    <TextBlock Text="{Binding Country}" FontSize="18" />
                                    <TextBlock Text="  Difficulty Mode: " FontSize="18"/>
                                    <TextBlock Text="{Binding Difficulty}" FontSize="18" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="Level: "  FontSize="18"/>
                                    <TextBlock Text="{Binding LevelNo}" FontSize="18" />
                                </StackPanel>                             
                            </StackPanel>
                            </Border>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
 <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/images/appbar.share.rest.png" Text="Share" Click="appbar_button1_Click"/>
          
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
    
</phone:PhoneApplicationPage>